package ShiYan;

import java.util.Scanner;

class Example14
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入sum的值：");
        int sum = sc.nextInt();

        for(int x  = 1 ; x <= 100 ; x++)
        {
            sum = sum + x;
        }
        System.out.println("sum=" +sum);
    }
}
